package com.stylefeng.guns.modular.system.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.stylefeng.guns.core.validater.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @Describe 机构分类角色功能
 * @author 张亚林
 * @since 2018-09-17
 */
@Data
@TableName("sys_orgcategory_role_function")
@ApiModel(value = "机构分类角色功能实体",description = "机构分类角色功能实体")
public class OrgcategoryRoleFunction extends Model<OrgcategoryRoleFunction> {

    private static final long serialVersionUID = 1L;

    public Integer getSofId() {
        return sofId;
    }

    public void setSofId(Integer sofId) {
        this.sofId = sofId;
    }

    /**
     * 编号
     */
    @TableId(value = "sof_id",type = IdType.AUTO)
    @ApiModelProperty(value = "编号",name="sofId",notes = "编号(后台自动生成)")
    @NotNull(message = "编号不能为空",groups = {Update.class})
    private Integer sofId;
    /**
     * 功能编号
     */
    @TableField(value = "sp_function_id")
    @ApiModelProperty(value = "功能编号",name="spFunctionId",notes = "功能编号")
    @NotNull(message = "功能编号不能为空",groups = {Update.class})
    private Integer spFunctionId;
    /**
     * 操作权限
     */
    @TableField("sp_method")
    @ApiModelProperty(value = "操作权限",name="spMethod",notes = "操作权限")
    private String spMethod;
    /**
     * 数据权限
     */

    @TableField("sf_data")
    @ApiModelProperty(value = "数据权限",name="spData",notes = "数据权限")
    private String spData;
    
    /***
     * 机构分类角色ID
     */
    @TableField("sor_id")
    private String sorId;
   
    /**
     * 创建人
     */
    @TableField("create_user")
    @ApiModelProperty(value = "创建人",name="createUser",notes = "创建人(系统维护)")
    private String createUser;
    /**
     * 创建时间
     */
    @TableField("create_time")
    @ApiModelProperty(value = "创建时间",name="createTime",notes = "创建时间(系统维护)")
    private Date createTime;
    /**
     * 修改人
     */
    @TableField("update_user")
    @ApiModelProperty(value = "修改人",name="updateUser",notes = "修改人(系统维护)")
    private String updateUser;
    /**
     * 修改时间
     */
    @TableField("update_time")
    @ApiModelProperty(value = "修改时间",name="updateTime",notes = "修改时间(系统维护)")
    private Date updateTime;


    @TableField(exist = false)
    private String objArrys;
    @Override
    protected Serializable pkVal() {
        return this.sofId;
    }
}
